package com.hades.example.java.refactoring.after.c10.c10_12_replace_constructor_with_factory_method._2;

public class Employee {
    // 根据明确函数创建子类
    // 将子类对用户隐藏起来；类个数很少，且不再变化；超类必须知晓子类
    static Employee createEngineer() {
        return new Engineer();
    }

    static Employee createSalesMan() {
        return new SalesMan();
    }

    static Employee createManager() {
        return new Manager();
    }

    public int maxNum() {
        return 10;
    }
}
